package com.itheima.homework.demoddz ;

import java.util.Objects;

/*
    牌类int
 */
public class Card {
    private int num;  //数字
    private String color;//颜色
    private String face;//形状
    private String show;

    public String getShow() {
        return show;
    }

    public void setShow(String show) {
        this.show = show;
    }

    public Card(int num, String color, String face) {
        this.num = num;
        this.color = color;
        this.face = face;
    }

    public Card() {
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Card card = (Card) o;
        return Objects.equals(num, card.num) &&
                Objects.equals(color, card.color) &&
                Objects.equals(face, card.face);
    }

    @Override
    public int hashCode() {
        return Objects.hash(num, color, face);
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getFace() {
        return face;
    }

    public void setFace(String face) {
        this.face = face;
    }

    @Override
    public String toString() {
        return "Card{" +
                "num='" + num + '\'' +
                ", color='" + color + '\'' +
                ", face='" + face + '\'' +
                '}';
    }
}
